<template>
    <div style="margin-top: 15px; width: 60%;">
        <el-input placeholder="请输入内容" v-model="searchParams.value" class="input-with-select">
            <el-select v-model="searchParams.type" slot="prepend" placeholder="请选择">
                <el-option label="订单编号" value="orderSerial"/>
                <el-option label="状态" value="orderStatus"/>
            </el-select>
            <el-button slot="append" icon="el-icon-search" @click="doSearch"/>
        </el-input>
        </div>
</template>

<script>
    import {mapActions, mapState} from "vuex";
    export default {
        computed: {
            ...mapState("order", ["searchParams"]),
        },
        methods: {
            doSearch() {
                this.showOrder()
            },
            ...mapActions("order", ["showOrder"])
        }
    }
</script>

<style>
    .el-select .el-input {
        width: 130px;
    }

    .input-with-select .el-input-group__prepend {
        background-color: #fff;
    }
</style>
